package common.exceptions;

/**
 * Thrown when the wrong password is being used
 * 
 * @author Gal Lalouche
 */
public class WrongPasswordException extends Exception {
	
	/**
	 * @param username The username used
	 * @param expectedPassword The username's expected password
	 */
	public WrongPasswordException(String username, String expectedPassword) {
		super("Can't login: incorrect username/password");
		if (username == null) {
			throw new IllegalArgumentException("userName is null");
		}
		if (expectedPassword == null) {
			throw new IllegalArgumentException("expectedPassword is null");
		}
	}
}
